<template>
    <div class="father">
        <h2>父组件</h2>
        <p>pnpm i mitt</p>
        <p v-if="toy">接收子组件传值： {{ toy }} </p>
        <Child  />
        <Brother  />
    </div>
</template>

<script lang="ts" setup name="Father">
import { ref } from 'vue';
import Child from './Child.vue';
import Brother from './Brother.vue';

let toy = ref('')
function xyz(str:string) {
    toy.value=str
}

</script>

<style>
.father{
    background-color: rgb(164, 164, 164);
    padding: 20px;
    border-radius: 10px;
}
</style>